<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<meta charset="utf-8" />
		<meta name="_token" content="{{ csrf_token() }}"/>
		<meta name="description" content="Restyling jQuery UI Widgets and Elements" />
		<link rel="stylesheet" href="admin/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="admin/assets/css/jquery-ui.custom.min.css" />
		<link rel="stylesheet" href="admin/assets/css/font-awesome.min.css" />
		<link rel="stylesheet" href="admin/assets/css/ace-fonts.css" />
		<link rel="stylesheet" href="admin/assets/css/ace.min.css" id="main-ace-style" />
		<script src="admin/assets/js/ace-extra.min.js"></script>
		<style type="text/css">
			.upxp {
				line-height: 22px; color: #555; 
				background-color: #FEFFFF; 
				filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FEFFFF', endColorstr='#F7FCFF');
				 background-image: -webkit-gradient( linear, left top, left bottom, from(#FEFFFF), to(#F7FCFF)) ; background-image: -moz-linear-gradient(top, #FEFFFF, #F7FCFF); 
				 vertical-align: middle; display: inline-block; height: 22px; padding: 0 4px; border: 1px solid; border-color: #DBE9EB #BCD7DA #BCD7DA #DBE9EB; cursor: pointer; 
				 box-shadow: 1px 1px 0 rgba(153,153,153,0.15);}
		</style>
		<title>test</title>
	</head>
	<body style="background: #FFFFFF;">
		<div class="form-group">
			<div class="center">
				<h3>案例添加</h3>
			</div>
		</div>
		<div class="page-content">
			<div class="page-content-area">
				<div class="row">
					<div class="col-xs-12">
						<form class="form-horizontal" role="form" action="{{ url('AnliindexaddUp') }}" method="post" enctype="multipart/form-data">
							{{ csrf_field() }}
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 输入案例题目：</label>
								<div class="col-sm-9">
									<input type="text" name="newName" id="newName" placeholder="名称" class="col-xs-10 col-sm-5" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1-1">选择案例分类： </label>
								<div class="col-sm-2">
									<div class="pos-rel">
										<select name="selt" class="form-control" id="selt">
											@foreach ($cat as $user)
											<option value="{{ $user->id }}">{{ $user->catname }}</option>
											@endforeach
										</select>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 案例导读图片：</label>
								<div class="col-sm-9">
									<input name="fileOne" type="file" multiple="" />
								</div>
							</div>
							<!--<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 案例PDF：</label>
								<div class="col-sm-9">
									<input name="fileTwo" type="file" multiple="" />
								</div>
							</div>-->
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="limited">输入案例描述：</label>
								<div class="col-sm-4">
									<div class="pos-rel">
										<textarea name="newDescription" class="form-control limited autosize-transition" id="limited" maxlength="255" style="height: 130px;" placeholder="描述"></textarea>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 案例详情：</label>
								<div class="col-sm-9">
									<script id="page-content" name="content" type="text/plain"></script>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> &nbsp;</label>
								<div class="col-sm-9">
									<input class="btn btn-info" type="submit" value="提交" style="width: 200px;"/>
									<span style="color: #6BA462;">案例导读图片 记得要上传哦，不然所有编辑将会消失</span>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div><!-- /.page-content-area -->
		</div><!-- /.page-content -->
	</body>
	<script type="text/javascript">window.jQuery || document.write("<script src='admin/assets/js/jquery.min.js'>" + "<" + "/script>");</script>
	<script type="text/javascript">if('ontouchstart' in document.documentElement) document.write("<script src='admin/assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");</script>
	<script src="admin/assets/js/bootstrap.min.js"></script>
	<script src="admin/assets/js/jquery-ui.custom.min.js"></script>
	<script src="admin/assets/js/jquery.ui.touch-punch.min.js"></script>
	<script src="admin/assets/js/chosen.jquery.min.js"></script>
	<script src="admin/assets/js/fuelux/fuelux.spinner.min.js"></script>
	<script src="admin/assets/js/jquery.dataTables.min.js"></script>
	<script src="admin/assets/js/jquery.dataTables.bootstrap.js"></script>
	<script src="admin/assets/js/jquery.hotkeys.min.js"></script>
	
	<script src="admin/assets/js/jquery.knob.min.js"></script>
	<script src="admin/assets/js/jquery.autosize.min.js"></script>
	<script src="admin/assets/js/jquery.inputlimiter.1.3.1.min.js"></script>
	<script src="admin/assets/js/jquery.maskedinput.min.js"></script>
	<script src="admin/assets/js/bootstrap-tag.min.js"></script>
	<script src="admin/assets/js/typeahead.jquery.min.js"></script>
	<!-- ace scripts -->
	<!--<script src="admin/assets/js/ace-elements.min.js"></script>
	<script src="admin/assets/js/ace.min.js"></script>-->
	<script>
		jQuery(function($) {
			$('textarea[class*=autosize]').autosize({append: "\n"});
			$('textarea.limited').inputlimiter({
				remText: ' 还能再输入%n个字...',
				limitText: '最多只能输入 : %n 个字.'
			});
		});
	</script>
	<script>
//		function submit_up(){
//			var newName = $("#newName").val();
//			var newAuthor = $("#newAuthor").val();
//			var newFrom = $("#newFrom").val();
//			var sel = $("#selt").find("option:selected").val();
//			var limited = $("#limited").val();
//			var htmls = $("#editor1").html();
//			
//			$.post("{s{ url('AnticelUp') }s}",{'_token':'{s{csrf_token()}s}','newName':newName,'newAuthor':newAuthor,'newFrom':newFrom,'sel':sel,'limited':limited,'htmls':htmls},
//				function(data){
//		           alert('Ajax post!'+data);
//	        	});
//  	}
</script>
<!-- 配置文件 -->
<script type="text/javascript" src="ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('page-content',{
        toolbars: [
            ['fullscreen', 'source', 'undo', 'redo','bold', 'italic', 'underline','fontborder', 'strikethrough', '|','simpleupload', 'insertimage','attachment','emotion','link','unlink', '|', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote','searchreplace', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc'],
            ['inserttable','insertrow', 'insertcol','mergeright', 'mergedown','deleterow', 'deletecol','splittorows','splittocols', 'splittocells','deletecaption','inserttitle', 'mergecells', 'deletetable','insertparagraphbeforetable', 'paragraph','fontsize','fontfamily']
        ],
        initialFrameHeight:500,
        zIndex:100
    });
</script>
</html>
